﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using KPIS.GERP.GHRMS.DAL;
using KPIS.GERP.GHRMS.MODEL;
using KPIS.GERP.GHRMS.IDAL;
using KPIS.GERP.GHRMS.IBLL;
using KPIS.GERP.GHRMS.DALFactory;

namespace KPIS.GERP.GHRMS.BLL
{
    public class HRMCoreCompetencyListBLL : IHRMCoreCompetencyListBLL
    {
        private static readonly IHRMCoreCompetencyListDAL dal = DataAccess.CreateCoreCompetencyList();

        private FieldInfo fieldInfo = new FieldInfo();
        private ExecutiveInfo execInfo = new ExecutiveInfo();
        private EmployeeTypeInfo etInfo = new EmployeeTypeInfo();
        private JobSiteInfo jsInfo = new JobSiteInfo();
        private PositionTypeInfo ptInfo = new PositionTypeInfo();
        private ClassSpecificationInfo specInfo = new ClassSpecificationInfo();
        private PositionStatusInfo psInfo = new PositionStatusInfo();
        private PositionInfo upperInfo = new PositionInfo();
        private PositionInfo workingInfo = new PositionInfo();
        private PositionInfo posInfo = new PositionInfo();

        public IList<PositionInfo> LoadPositionTreeView(Nullable<int> EmpTypeSeq)
        {
            return dal.LoadPositionTreeView(EmpTypeSeq);
        }

        public IList<TreeViewInfo> LoadPositionJobsites(Nullable<int> EmpTypeSeq, string ParentID)
        {
            return dal.LoadPositionJobsites(EmpTypeSeq, ParentID);
        }

        public void Insert(string strPosSeq, int? intCoreCompentencySeq, int? intCompentencyLevelSeq, int? intWeight
                            , int? intCreateBy)
        {
            dal.Insert(strPosSeq, intCoreCompentencySeq, intCompentencyLevelSeq, intWeight, intCreateBy);
        }

        public DataTable Search(int? intCoreCompentencySeq, int? intCompentencyLevelSeq, int? intExpectResult 
                                ,int? intWeight, string strPosSeq)
        {
            return dal.Search(intCoreCompentencySeq, intCompentencyLevelSeq, intExpectResult, intWeight, strPosSeq);
        }

        public void Update(int? intPosCompentencySeq, int? intCoreCompentencySeq, int? intCompentencyLevelSeq
                           , int? intWeight, int? intCreateBy)
        {
            dal.Update(intPosCompentencySeq, intCoreCompentencySeq, intCompentencyLevelSeq, intWeight
                       , intCreateBy);
        }

        public void Delete(int? intPosCompentencySeq)
        {
            dal.Delete(intPosCompentencySeq);
        }

        public DataTable LoadCoreCompetency()
        {
            return dal.LoadCoreCompetency();
        }

        public DataTable LoadCompentencyLevel(int? intCoreCompentencySeq)
        {
            return dal.LoadCompentencyLevel(intCoreCompentencySeq);
        }

        public bool CheckValueSubmit(int? intPosCompentencySeq)
        {
            return dal.CheckValueSubmit(intPosCompentencySeq);
        }

        public bool CheckSumWeight(int? intWeight, string strPosSeq)
        {
            return dal.CheckSumWeight(intWeight, strPosSeq);
        }

        public bool CheckUnique(string strPosSeq, int? intCoreCompentencySeq)
        {
            return dal.CheckUnique(strPosSeq, intCoreCompentencySeq);
        }

        public string LoadNamePos(string strPosSeq)
        {
            return dal.LoadNamePos(strPosSeq);
        }
     }
}